package io.github.talelin.latticy.model.oms;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.github.talelin.latticy.common.pojo.BaseDO;
import lombok.Data;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

/**
 * @ClassName：ProductDO
 * @Author: ljj
 * @Date: 2022/5/10 11:29
 */
@Data
@Accessors(chain = true)
@TableName("t_product")
public class ProductDO extends BaseDO {

    public static final Integer ALONE_PRODUCTS = 1;
    public static final Integer PORTFOLIO_PRODUCTS = 2;

    @NotEmpty(message = "{product.sku.not-blank}")
    private String sku;

    @NotEmpty(message = "{product.name.not-blank}")
    @TableField(value = "`name`")
    private String name;

    @NotEmpty(message = "{product.enName.not-blank}")
    private String enName;

    private String pictureUrl;

    private Integer alarmThreshold;

    private Integer inventory;

    @NotNull (message = "{product.length.not-blank}")
    @TableField(value = "`length`")
    private BigDecimal length;

    @NotNull (message = "{product.width.not-blank}")
    private BigDecimal width;

    @NotNull (message = "{product.height.not-blank}")
    private BigDecimal height;

    @NotNull (message = "{product.lwhType.not-blank}")
    private Integer lwhType;

    @NotNull (message = "{product.weight.not-blank}")
    private Integer weight;

    @NotNull (message = "{product.weightType.not-blank}")
    private Integer weightType;

    @NotNull (message = "{product.categoryId.not-blank}")
    private Long categoryId;

    private String brand;

    private BigDecimal purchaseCost;

    @NotNull(message = "{product.packagType.not-blank}" )
    private Integer packagType;

    private Integer singlePackagNum;

    private Long packagMaterialId;

    private String customsCode;

    private String origin;

    private String company;

    private BigDecimal declarePrice;

    private String customsDesc;

    @NotNull(message = "{product.isBattery.not-blank}" )
    private Boolean isBattery;

    @TableField(value = "`desc`")
    private String desc;

    private String creatorCode;

    private Integer status;

    private Boolean isDisable;

    private Integer type;

    @NotNull(message = "product.goodsType.not-blank")
    private Integer goodsType;

    @NotNull(message = "product.isLiquid.not-blank")
    private Boolean isLiquid;

    @NotNull(message = "product.isMagnetized.not-blank")
    private Boolean isMagnetized;

    private String tenant;
}
